package JHfstools;

import java.awt.EventQueue;

import javax.swing.JDialog;
import java.awt.Color;
import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Dimension;

public class hftdirdlg extends JDialog {
	private JTextField hftdirdlgname;
	private boolean dirdlgrc = false;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					hftdirdlg dialog = new hftdirdlg();
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the dialog.
	 */
	public hftdirdlg() {
		setModal(true);
		setPreferredSize(new Dimension(454, 302));
		getContentPane().setBackground(new Color(245, 255, 250));
		getContentPane().setLayout(null);
		
		hftdirdlgname = new JTextField();
		hftdirdlgname.setBorder(new TitledBorder(null, "New directory name", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		hftdirdlgname.setBounds(10, 60, 422, 40);
		getContentPane().add(hftdirdlgname);
		hftdirdlgname.setColumns(10);
		
		JButton hftdirdlgok = new JButton("");
		hftdirdlgok.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
				dirdlgrc = true;
				return;
			}
		});
		hftdirdlgok.setIcon(new ImageIcon(hftdirdlg.class.getResource("/JHfstools/images/dlgok.png")));
		hftdirdlgok.setBounds(10, 215, 41, 40);
		getContentPane().add(hftdirdlgok);
		
		JButton hftdirdlgcan = new JButton("");
		hftdirdlgcan.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
				dirdlgrc = false;
				return;
			}
		});
		hftdirdlgcan.setIcon(new ImageIcon(hftdirdlg.class.getResource("/JHfstools/images/dlgcan.png")));
		hftdirdlgcan.setBounds(391, 215, 41, 40);
		getContentPane().add(hftdirdlgcan);
		setTitle("HFS TOOLS new Directory");
		setBounds(100, 100, 454, 302);

	}

	public JTextField getHftdirdlgname() {
		return hftdirdlgname;
	}
	public boolean getdirdlgrc() {
		return dirdlgrc;
	}
}
